Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Fixes #2580 - parse port to number type if provided in a different type #2610

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

jeffsmale90
Copy link
Contributor

I didn't end up changing the listen() signature, I agree that having a specific signature makes sense.

I did check the http.server.listen() behaviour, AFAIK our implementation now matches it wrt providing port number as string.

Copy link
Member

@davidmurdoch davidmurdoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

I've left some comments requesting some changes. Let me know if you need additional explanations on anything I've suggested here.

src/packages/core/src/server.ts Outdated Show resolved Hide resolved
src/packages/core/tests/server.test.ts Outdated Show resolved Hide resolved
src/packages/core/tests/server.test.ts Show resolved Hide resolved
* Improved validation and parsing of port value - inspiration from nodejs internal port validator
* Wider range of postive and negative test values, including octal and binary
* Fixed spelling of hexadecimal
@jeffsmale90 jeffsmale90 merged commit 386771d into develop Mar 17, 2022
@jeffsmale90 jeffsmale90 deleted the fix/non-numeric-port-number branch March 17, 2022 21:52
MicaiahReid pushed a commit to domob1812/ganache that referenced this pull request Apr 20, 2022
…#2610)

* Fixes trufflesuite#2580
* Improved validation and parsing of port value - inspiration from nodejs internal port validator
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incoherent "Address already in use 127.0.0.1:XXXX" issue when using Ganache programmatically (JS)
2 participants